<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<div>
	<!-- 清除浮动 -->
	<div class="clearfix"></div>
	<div class="lefter">
		<div class="logo">
			<h3>
				<a href="${basePath }shop/show_shop">
					<strong>西普茗茶商品<br>后台管理
					</strong>
				</a>
			</h3>
		</div>
	</div>
	<div class="righter nav-navicon" id="admin-nav">
		<div class="mainer">
			<div class="admin-navbar">
				<span class="float-right"> <!-- <a class="button button-little bg-blue" href="seller/change_password.jsp"">
						<span class="icon-key"></span> 修改密码
					</a> --> <a class="button button-little bg-yellow" href="admin/exit"">
						<span class="icon-power-off"></span> 安全退出
					</a>
				</span>
				<ul class="nav nav-inline admin-nav">
					<li id="begin_module" class="active nav_first_li">
						<a href="javascript:void(0)" class="nav_tag_a_link icon-home" data-url="shop/ajax/shop/welcome.jsp"> 开始</a>
						<ul>
							<li class="active">
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_my_shop" data-url="shop/ajax/shop/welcome.jsp">管理中心首页</a>
							</li>
						</ul>
					</li>
					<li id="type_module" class="nav_first_li" style="display: none;">
						<a href="javascript:void(0)" class="nav_tag_a_link icon-cubes"> 分类</a>
						<ul>
							<li class="active">
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_update_custom_type" data-url="goods_type/update_custom_type">我的分类</a>
							</li>
						</ul>
					</li>
					<li id="goods_module" class="nav_first_li" style="display: none;">
						<a href="javascript:void(0)" class="nav_tag_a_link icon-file-text"> 商品</a>
						<ul>
							<li class="active">
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_add_goods" data-url="shop/shop_add_goods"> 添加商品</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_prepared_goods" data-url="shop/show_goods_info_list?s=准备中">待上架的商品</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_on_sale_goods" data-url="shop/show_goods_info_list?s=销售中">销售中的商品</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_sold_out_goods" data-url="shop/show_goods_info_list?s=已下架">已下架的商品</a>
							</li>
						</ul>
					</li>
					<li id="order_module" class="nav_first_li" style="display: none;">
						<a href="javascript:void(0)" class="nav_tag_a_link icon-shopping-cart"> 订单</a>
						<ul>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_to_be_payed_order" data-url="shop/show_order_list?s=待付款">待付款订单</a>
							</li>
							<li class="active">
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_to_be_send_order" data-url="shop/show_order_list?s=待发货">待发货订单</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_to_be_received_order" data-url="shop/show_order_list?s=待收货">待收货订单</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_to_be_commented_order" data-url="shop/show_order_list?s=待评价">待评价订单</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_to_be_done_order" data-url="shop/show_order_list?s=交易完成">已完成订单</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_to_be_cancelled_order" data-url="shop/show_order_list?s=交易取消">已取消订单</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_all_order" data-url="shop/show_order_list">全部订单</a>
							</li>
						</ul>
					</li>
					<li id="order_return_module" class="nav_first_li" style="display: none;">
						<a href="javascript:void(0)" class="nav_tag_a_link icon-refresh"> 退换货</a>
						<ul>
							<li class="active">
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_apply_verifying_order_return" data-url="shop/show_return_order_list?s=申请审核中">申请审核中</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_buyer_returning_order_return" data-url="shop/show_return_order_list?s=买家退换货中">买家退换货中</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_seller_processing_order_return" data-url="shop/show_return_order_list?s=卖家处理中">卖家处理中</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_completed_order_return" data-url="shop/show_return_order_list?s=已完成">已完成</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_apply_refused_order_return" data-url="shop/show_return_order_list?s=申请未通过">申请未通过</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_all_order_return" data-url="shop/show_return_order_list">全部退换货订单</a>
							</li>
						</ul>
					</li>
					<li id="shop_module" class="nav_first_li" style="display: none;">
						<a href="javascript:void(0)" class="nav_tag_a_link icon-th-list"> 店铺</a>
						<ul>
							<li class="active">
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_edit_shop" data-url="shop/shop_update_shop">编辑资料</a>
							</li>
							<hr class="margin-little">
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_add_kefu" data-url="shop/ajax/kefu/add_kefu.jsp">添加微信推送客服</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_kefu_list" data-url="shop/show_kefu_info_list">所有微信推送客服</a>
							</li>
							<hr class="margin-little">
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_download_report" data-url="shop/ajax/shop/report_download.jsp">报表下载</a>
							</li>
							<hr class="margin-little">
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_edit_province_postage" data-url="shop/shop_update_province_postage">编辑各省邮费</a>
							</li>
						</ul>
					</li>
					<li id="coupon_module" class="nav_first_li" style="display: none;">
						<a href="javascript:void(0)" class="nav_tag_a_link icon-money"> 优惠券</a>
						<ul>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_add_coupon" data-url="shop/ajax/coupon/add_coupon.jsp">添加优惠券</a>
							</li>
							<li class="active">
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_coupon_list" data-url="shop/show_coupon_info_list">所有优惠券</a>
							</li>
						</ul>
					</li>
					<li id="buyer_module" class="nav_first_li" style="display: none;">
						<a href="javascript:void(0)" class="nav_tag_a_link icon-users"> 买家</a>
						<ul>
							<li class="active">
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_used_buyer" data-url="shop/show_buyer_list?s=使用中">使用中的买家</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_freezing_buyer" data-url="shop/show_buyer_list?s=冻结中">冻结中的买家</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_all_buyer" data-url="shop/show_buyer_list">全部买家</a>
							</li>
						</ul>
					</li>
					<li id="message_module" class="nav_first_li" style="display: none;">
						<a href="javascript:void(0)" class="nav_tag_a_link icon-comments-o"> 留言</a>
						<ul>
							<li class="active">
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_to_be_handled_message" data-url="shop/show_message_info_list?s=待处理">待处理留言</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_have_replyed_message" data-url="shop/show_message_info_list?s=已回复">已回复留言</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_have_forgetted_message" data-url="shop/show_message_info_list?s=已忽略">已忽略留言</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_all_message" data-url="shop/show_message_info_list">全部留言</a>
							</li>
						</ul>
					</li>
					<li id="a_pic_module" class="nav_first_li" style="display: none;">
						<a href="javascript:void(0)" class="nav_tag_a_link icon-bullhorn"> 宣传图片</a>
						<ul id="a_pic_shop_ul">
							<li class="active">
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_add_a_pic" data-url="shop/ajax/a_pic/add_a_pic.jsp">添加宣传图片</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_a_pic_m_h1" data-url="shop/show_a_pic_info_list?type=m_h1">首页顶部轮播图片(640x320)</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_a_pic_m_h2" data-url="shop/show_a_pic_info_list?type=m_h2">首页专区花瓣图片(200x200)</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_a_pic_m_p1" data-url="shop/show_a_pic_info_list?type=m_p1">促销商品页面图片(640x320)</a>
							</li>
							<hr class="margin-little">
						</ul>
					</li>
					<li id="help_module" class="nav_first_li" style="display: none;">
						<a href="javascript:void(0)" class="nav_tag_a_link icon-file-text"> 帮助中心</a>
						<ul>
							<li class="active">
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_add_article" data-url="shop/ajax/article/add_article.jsp">添加文章</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_released_article" data-url="shop/show_article_info_list">已发布的文章</a>
							</li>
						</ul>
					</li>
					<li id="manager_module" class="nav_first_li" style="display: none;">
						<a href="javascript:void(0)" class="nav_tag_a_link icon-unlock-alt"> 管理员</a>
						<ul>
							<li class="active">
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_add_manager" data-url="shop/ajax/manager/add_manager.jsp">添加管理员</a>
							</li>
							<li>
								<a href="javascript:void(0)" class="sub_tag_a_link" id="sub_see_manager_list" data-url="shop/show_manager_info_list">已添加的管理员</a>
							</li>
						</ul>
					</li>
				</ul>
			</div>
			<div class="admin-bread">
				<span>您好，${managerSession.managerName }，欢迎您的光临。</span>
				<ul class="bread">
					<li>
						<a href="javascript:void(0)" class="icon-home click_go_to_nav_button" data-trigger-id="#sub_my_shop"> 开始</a>
					</li>
					<li id="bread_second_li">管理中心首页</li>
				</ul>
			</div>
		</div>
	</div>
</div>
<div id="module_name_list_div" style="display: none;">
	<span data-id="" data-text=""></span>
</div>
<script type="text/javascript">
	//关闭AJAX相应的缓存 
	$.ajaxSetup(
	{
		cache : false
	});
	$("#admin-nav").on("click", ".admin-nav>li", function(e)
	{
		$(".admin-nav>li").removeClass("active");
		$(this).addClass("active");
		$(this).find("ul li.active").trigger("click");
	});
	$("#admin-nav").on("click", ".admin-nav>li>ul>li", function(e)
	{
		$(this).parent().find("li").removeClass("active");
		$(this).addClass("active");
		$("#bread_second_li").html($(this).find("a").html());
		e.stopPropagation();
		$("#admin_div").load(encodeURI($(this).find("a").attr("data-url")), {}, function()
		{

		});
	});
	$("#admin-nav").on("click", ".sub_tag_a_link", function(e)
	{
		e.stopPropagation();
		$(this).closest("ul").find("li").removeClass("active");
		$(this).closest("li").addClass("active");
		$(this).closest("li.nav_first_li").trigger("click");
	});
	//$(".nav_first_li").show();
	$.post("admin/m_get_manager_module_do", {}, function(json)
	{
		if (json.success == true && json.moduleList != null)
		{
			$.each(json.moduleList, function(i, n)
			{
				$("#" + n.moduleName).show(0);
			});
			$("#module_name_list_div").empty();
			$(".nav_first_li").each(function(index, domEle)
			{
				var obj = $(domEle);
				var moduleText = obj.children("a.nav_tag_a_link").text().replace(" ", "");
				$("#module_name_list_div").append('<span data-id="' + obj.attr("id") + '" data-text="' + moduleText + '"></span>');
				if (obj.css("display") == "none")
				{
					obj.remove();
				}
			});
		}
	},
	//返回类型
	"json");
</script>
